<template>
	<view style="background-color: orange; height: 120px;" class="flex-ai-cen">
		<text style="font-size: 50rpx"> 子组件A</text>
		<view class="coma_box">
			<text>父组件传来的值：</text>
			<text style="font-weight: bold; color: red;">{{intent}}</text>
		</view>
		<button type="primary" @click="sendData()" style="width: 80%;">传值给ComB组件</button>
	</view>
</template>

<script>
	export default {
		name:"comA",
		props:['intent'],
		data() {
			return {
				
			};
		},
		methods:{
			sendData(){
				console.log("compA--sentData-->",this.intent);
				uni.$emit('getIntent',this.intent)
			}
		}
	}
</script>

<style>

</style>